package com.xuelang.pipeline.app.pipeline.converter;

import com.xuelang.pipeline.client.pipeline.dto.DeploymentUnitDTO;
import com.xuelang.pipeline.domain.pipeline.DeploymentUnit;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * <p>部署单DTO转换器</p>
 *
 * @author : yixin.lys
 * @date : 2024-06-25 17:35
 **/
@Mapper
public interface DeploymentUnitToDTOConverter {

    DeploymentUnitToDTOConverter INSTANCE = Mappers.getMapper(DeploymentUnitToDTOConverter.class);

    /**
     * 从DTO转换
     * @param target
     * @return
     */
    DeploymentUnit fromDTO(DeploymentUnitDTO target);

    /**
     * 转换为DTO
     * @param target
     * @return
     */
    DeploymentUnitDTO toDTO(DeploymentUnit target);

}
